/*
* INSANE - Interactive Structural Analysis Environment
*
* Copyright (C) 2003-2005
* Universidade Federal de Minas Gerais
* Escola de Engenharia
* Departamento de Engenharia de Estruturas
* 
* Author's email :    insane@dees.ufmg.br
* Author's website :  http://www.dees.ufmg.br/insane
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
package br.ufmg.dees.insane.model.disc.element.force;

import java.util.ArrayList;

import br.ufmg.dees.insane.model.disc.element.ParametricElement;
import br.ufmg.dees.insane.model.disc.node.Node;
import br.ufmg.dees.insane.model.disc.parametricintegration.ParametricIntegration;

/**
*A class representing a distributed force.<br>
*It may be a constant distributed force, a trapezoidal distributed force or a triangular distributed force.
*
*@author Nicoliello, Renata & Pitangueira, Roque
*@version 1.0
*@since march 2006
*@see java.util.ArrayList
*/

public class Side implements java.io.Serializable {
	
	private static final long serialVersionUID = 1L;
	protected String label;
	protected ParametricIntegration pI;
	protected int nNodes;
	protected ArrayList<Node> nodes = new ArrayList<Node>();
	protected ParametricElement element;
	
	
	public Side(ParametricElement element){
		
	this.element=element;
	pI=element.getLineEqLoad();
	nNodes = pI.getIntegrationOrder();
	
	}
//********************************************************************************
	
	/** Returns the label of this Side.
	*@return The label of this Side.
	*/
	public String getLabel(){
		return (label);
	};
	
	/** Sets the label of this Side.
	*@param a The label of this Side.
	*/
	public void setLabel(String a){
		label = a;
	};
	
//********************************************************************************
	
	/** Returns the number of nodes of this Side.
	*@return The number of nodes of this Side.
	*/
	public int getNNodes(){
		return (nNodes);
	};
	
	/** Sets the number of nodes of this Side.
	*@param a The number of nodes of this Side.
	*/
	public void setNNodes(){
		nNodes = pI.getIntegrationOrder();
	};
	
//********************************************************************************
	
	/** Returns the number of nodes of this Side.
	*@return The number of nodes of this Side.
	*/
	public int getNumberOfNodes(){
		return (nodes.size());
	};
	
//********************************************************************************
	
	/** Returns the list of nodes of this Side.
	*@return The list of nodes of this Side.
	*/
	public ArrayList<Node> getNodesList() {
		return (nodes);
	};
	
//********************************************************************************
	
	/** Adds a node to this Side.
	*@param a The node to be added.
	*/
	public void addNode(Node no) {
		
		nodes.add(no);
	}
	
//********************************************************************************
}
